<template>
  <div id="podcastView">
    <van-nav-bar
      :title="headline"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <pushView :jinList="updataList" :pushViewRows="pushViewRows"></pushView>
    <playlists
      :playlistsRows="playlistsRows"
      :playList="item"
      v-for="(item, index) in playList"
      :key="index"
    ></playlists>
  </div>
</template>

<script>
import playlists from "../../views/video/playlists";
import pushView from "@/views/video/pushView";
import LoginVue from "./Login.vue";
export default {
  components: {
    playlists,
    pushView,
  },
  data() {
    return {
      pushViewRows: 2,
      headline: "1",
      playlistsRows: 3,
      pushViewRows: 3,
      playList: [
        {
          value: "精选",
          list: [],
        },
        {
          value: "火热",
          list: [],
        },
        {
          value: "伤感",
          list: [],
        },
        {
          value: "抒情",
          list: [],
        },
        {
          value: "舒畅",
          list: [],
        },
        {
          value: "热门",
          list: [],
        },
      ],
      updataList: [],
    };
  },
  mounted() {
    console.log(this.$route);
    let obj = this.$route.params;

    if (Object.keys(obj).length == 0) {
      obj = JSON.parse(sessionStorage.getItem("obj"));
    } else {
      sessionStorage.setItem("obj", JSON.stringify(obj));
    }
    console.log(obj);
    this.headline = obj.headline;
    this.playList = obj.playList;
    this.updataList = obj.updataList;
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="less">
@color1: red;
@background: #fff;
#podcastView {
  z-index: 10;
  flex-direction: column;
  background: @background;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
}
</style>